<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <title>智慧粮库测控平台</title>
  <link rel="stylesheet" href="../css/theme.css" />
  <link rel="stylesheet" href="../css/index.css" />
  <link rel="stylesheet" href="../css/iconfont.css" />
  <link rel="stylesheet" href="../css/svg-icons.css" />
  <!-- VConsole 调试工具 -->
  <!-- <script src="../lib/vconsole/vconsole.min.js"></script>
  <script src="../js/vconsole-init.js"></script> -->


  <style>
    /* 为SVG图标添加覆盖层样式，确保点击事件被捕获 */
    .svg-icon-wrapper {
      position: relative;
    }

    .icon-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 10;
      cursor: pointer;
    }
  </style>
</head>

<body>
  <div class="container">
    <header>
      <h1>华荣安工智慧粮库</h1>
    </header>

    <main>
      <div class="grid-container">
        <div class="item" data-module="rainsituation">
          <div class="svg-icon-wrapper clickable">
            <img src="../image/svg/data-analysis.svg" alt="粮情检测">
            <div class="icon-overlay"></div>
          </div>
          <div class="title">粮情检测</div>
        </div>

        
  
        
        <div class="item" data-module="ventilation">
          <div class="svg-icon-wrapper clickable">
            <img src="../image/svg/ventilation.svg" alt="智能通风">
            <div class="icon-overlay"></div>
          </div>
          <div class="title">智能通风</div>
        </div>


        <div class="item" data-module="gas">
          <div class="svg-icon-wrapper clickable">
            <img src="../image/svg/gas.svg" alt="气体检测">
            <div class="icon-overlay"></div>
          </div>
          <div class="title">气体检测</div>
        </div>

        <div class="item" data-module="air-condition">
          <div class="svg-icon-wrapper clickable">
            <img src="../image/svg/air-condition.svg" alt="空调控温">
            <div class="icon-overlay"></div>
          </div>
          <div class="title">空调控温</div>
        </div>


      
        <div class="item" data-module="pestdetection">
          <div class="svg-icon-wrapper clickable">
            <img src="../image/svg/pest-detection.svg" alt="虫情检测">
            <div class="icon-overlay"></div>
          </div>
          <div class="title">虫情检测</div>
        </div>
      

        <div class="item" data-module="energy">
          <div class="svg-icon-wrapper clickable">
            <img src="../image/svg/energy.svg" alt="能耗检测">
            <div class="icon-overlay"></div>
          </div>
          <div class="title">能耗检测</div>
        </div>

        <div class="item" data-module="alarmanalysis">
          <div class="svg-icon-wrapper clickable">
            <img src="../image/svg/data-analysis.svg" alt="报警分析">
            <div class="icon-overlay"></div>
          </div>
          <div class="title">报警分析</div>
        </div>


        <div class="item" data-module="other">
          <div class="svg-icon-wrapper clickable">
            <img src="../image/svg/temperature.svg" alt="其他信息">
            <div class="icon-overlay"></div>
          </div>
          <div class="title">其他信息</div>
        </div>

      

        <div class="item" id="basicmanager" data-module="basicmanager">
          <div class="svg-icon-wrapper clickable">
            <img src="../image/svg/settings.svg" alt="系统配置">
            <div class="icon-overlay"></div>
          </div>
          <div class="title">系统配置</div>
        </div>


        
      </div>
    </main>

    <footer>
      <div class="footer-content">
        <div class="header-subtitle">安全、高效的智慧粮库解决方案</div>
        <p id="copyright-info"></p>
      </div>
    </footer>
  </div>

  <script src="../js/android-interface.js"></script>
  <script src="../js/common.js"></script>
  <script src="../js/widgets.js"></script>
  <script src="../lib/jquery.js"></script>
  <script src="../lib/utils.js"></script>
  <script src="../js/usermanager.js"></script> 
  <script src="../js/index.js"></script>
  <script>
    document.addEventListener('DOMContentLoaded', function() {
      // 设置底部版权信息
      var version = (window.AppConfig && window.AppConfig.version) ? window.AppConfig.version : '';
      var copyright = `© 2024-2030 智慧粮库系统 版本 ${version}`;
      var copyrightEl = document.getElementById('copyright-info');
      if (copyrightEl) copyrightEl.textContent = copyright;

      // 绑定SVG图标点击事件
      const iconOverlays = document.querySelectorAll('.icon-overlay');
      iconOverlays.forEach(overlay => {
        overlay.addEventListener('click', function(e) {
          // 阻止事件冒泡
          e.stopPropagation();
          
          // 获取父元素的模块类型
          const moduleItem = this.closest('.item');
          if (moduleItem) {
            const moduleType = moduleItem.getAttribute('data-module');
            if (moduleType && typeof navigateToModule === 'function') {
              navigateToModule(moduleType);
            }
          }
        });
      });
    });
  </script>
</body>

</html>